In the reproduction of digital data obtained, for example, by electronically scanning an input document, it is often desirable to perform electronic registration, deskew, masking, automatic magnification other useful image processing operations. Many of these operations require precise location of the borders of the document. In other words, these features cannot be performed unless one or more of the edges of the document are first detected by the scanning system.
Digital scanners are commonly used to capture images from hardcopy media. In a typical scanning operation, the surface of an input document is illuminated as an image sensor moves past the document detecting the intensity of light reflected from each location. These analog light intensity values are subsequently stored at corresponding pixel locations as proportionate electrical charges, which are collectively passed to an image processor where they are quantized to grayscale levels. Each grayscale level is represented by a multi-bit digital value that has a number of bits that is determined by the number of intensity levels that can be generated by the scanner. For example, in a scanner that represents grayscale levels using 8 bit words will be able to capture 256 (28) different intensity levels. The grayscale value for the level that provides the closest match to the intensity of light reflected from each location is assigned to the corresponding pixel. Thus, scanning captures analog input images by generating a stream of multi-bit values, with each location in the image being represented by a multi-bit digital word.
One or more scanners, printers, video displays and/or computer storage devices are often connected via a communications network to provide a digital reproduction system. For example, a digital copier may incorporate a scanner and a digital printer. While scanners capture hundreds of light intensity levels, digital output devices usually generate relatively few levels of output. For example, digital printers typically process binary output, for which a single bit is assigned to each pixel. During printing, marking material is either applied to or withheld from the pixel depending upon the assigned value. In a system with a digital printer and scanner, the grayscale data generated by the image capture device is usually rendered to binary format and stored in memory, from which it is subsequently retrieved by the output device. While it is possible to print data as it is rendered, storing it first provides several advantages. For one, when the data is stored, it is possible to print multiple copies of the same page without having to repeatedly re-scan the input document. It is also easier to transfer stored data between devices, as it can be compressed and decompressed.
Grayscale image data is often processed for improved image quality. In order to avoid data loss, image processing is preferably applied before the image is rendered. Well known image processing techniques are performed to improve image contrast, sharpness and color, to eliminate scanning artifacts, hole punches and other undesirable data and for many other reasons.
Most systems that digitally reproduce images use mechanical systems to properly align the document as it is transported to the scanning area. While mechanical systems and methods are useful, they cannot typically place the document in perfect alignment position on the scanning surface before it is captured by the scanner. As such, electronic systems and methods are employed to apply the fine tuning that is required to accurately align the image.
For example, “skew” may be introduced when an input document becomes rotated relative to the image sensor before it is captured. Skew correction is a well known imaging process that eliminates skew by determining the magnitude and direction of the document rotation relative to a document edge and applying a corresponding counter rotation to the image data.
Cropping, another well known imaging process, is performed to remove extraneous data, such as image data that represents the document transport, scanner platen and other hardware that is present in the scanning when the document is digitally captured. In a typical cropping operation, the size of the document is determined and is its location inside the scan. The data that lies outside of the identified region is then removed before the image is printed.
One-pass scanners process image data “on-the-fly,” i.e., the grayscale data is generated, processed and rendered in real-time. An accurate and robust digital image processing technique analyzes the entire scan to select the data that is most relevant for processing. However, one-pass scanners typically store a subset of the scanned data for use in image processing operations. For example, some systems detect document edges by finding the extreme points of the document on the scanned page. Others determine the skew angle and/or registration point based upon small segments of identified document edges. As these decisions are based on very limited amount of information, the results produced by these approaches are often unreliable.
It is therefore, beneficial to provide a system and method for processing a grayscale image in real-time based upon an analysis of an entire scan.